/**
 * @version v1.0
 * @Description:
 * @Author zhanzhongxin
 * @Date 2021/7/12 13:58
 * @Copyright 博为峰
 */
public class Student {
    public String name;
    public int age;

    public Student() {
//      this("王五");
    }

    public Student(String name) {
        this();
        this.name = name;
    }

    //this调用其它构造方法时，必须放在第一行
    public Student(String name, int age) {
        this("李四");//调用一个参数的构造方法
        this.name = name;
        this.age = age;
        this.study();
    }

//    public Student(){}

    public void study(){
        //this
//        Person("赵六");
        System.out.println(this.name + "学习");
    }
}
